<% category = @post.category %>
<h2><%= @post.title %> <span>category <%= link_to(category.title, category_path(category)) %></span></h2>

<% url = url_for_file_column('post', 'image', 'normal') -%>
<%= image_tag(url) if url %>

<div id="bookings">
<h3>Future reservations</h3>
<% start_date = 1.days.ago %>
<ul>
	<% @post.future_reservations.each do |res| %>
	<% title = res.start_date.strftime('%a, %d %b %Y') %>
	<% if start_date != nil and title != start_date.strftime('%a, %d %b %Y') -%>
	    <h4><%= title %></h4>
	    <% start_date = res.start_date -%>
	<% end -%>
	<li><%= view_reservation(res)%></li>
	<% end %>
</ul>
</div><!-- end of bookings -->